package com.perfma.xtest.tool;

import java.awt.*;

/**
 * @author: junhui.si
 * @date: 2020-12-08 16:57
 **/
public class FontDemo {
    public static void main(String[] args) {
        GraphicsEnvironment g = GraphicsEnvironment.getLocalGraphicsEnvironment();
        Font[] fonts = g.getAllFonts();
        System.out.println("-------------getAllFonts-------------");
        for (Font font : fonts) {
            System.out.println(font);
        }
        
        System.out.println("-------------getAvailableFontFamilyNames-------------");
        String[] fontNames = g.getAvailableFontFamilyNames();
        for (String font : fontNames) {
            System.out.println(font);
        }
    }
}
